<?php
include('db.php');
$db = getDb();

$content=file_get_contents("../view/events.html");

$_SUBEVENTS_="_SUBEVENTS_";
$_SUBEVENTS_content="";

$_ID_="_ID_";
$_ID_content= 1;



$sqlCommand="SELECT id,subject FROM subevent WHERE eventid=". 1;
$result = $db->Execute($sqlCommand);

if ($result === false)
	die($sqlCommand);

while (!$result->EOF)
{
	$_SUBEVENTS_content.= "<li><a href=\"details.php?id=". $result->fields[0] . "\">". $result->fields[1] ."</a> </li>\n";

	$result->MoveNext();
}


// Display page
$content = str_replace($_SUBEVENTS_ , $_SUBEVENTS_content, $content);
$content = str_replace($_ID_ , $_ID_content, $content);
echo $content;
 
?>






<!-- <option value="a">a</option>  -->